/**
 * 严肃声明：
 * 开源版本请务必保留此注释头信息，若删除我方将保留所有法律责任追究！
 * 本软件已申请软件著作权，受国家版权局知识产权以及国家计算机软件著作权保护！
 * 可正常分享和学习源码，不得用于违法犯罪活动，违者必究！
 * Copyright (c) 2022 程序员十三 all rights reserved.
 * 版权所有，侵权必究！
 */
package com.mali.goods.impl;

import com.mali.goods.NewBeeMallGoodsService;
import com.mali.goods.dao.GoodsCategoryMapper;
import com.mali.goods.dao.NewBeeMallGoodsMapper;
import com.mali.goods.entity.NewBeeMallGoods;
import com.mali.goods.entity.StockNumDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewBeeMallGoodsServiceImpl implements NewBeeMallGoodsService {

    @Autowired
    private NewBeeMallGoodsMapper goodsMapper;
    @Autowired
    private GoodsCategoryMapper goodsCategoryMapper;


    @Override
    public String saveNewBeeMallGoods(NewBeeMallGoods goods) {
        return "";
    }

    @Override
    public void batchSaveNewBeeMallGoods(List<NewBeeMallGoods> newBeeMallGoodsList) {

    }

    @Override
    public String updateNewBeeMallGoods(NewBeeMallGoods goods) {
        return "";
    }

    @Override
    public NewBeeMallGoods getNewBeeMallGoodsById(Long id) {
        NewBeeMallGoods newBeeMallGoods = goodsMapper.selectByPrimaryKey(id);
        return newBeeMallGoods;
    }

    @Override
    public List<NewBeeMallGoods> getNewBeeMallGoodsByIds(List<Long> goodsIds) {
        return goodsMapper.selectByPrimaryKeys(goodsIds);
    }

    @Override
    public Boolean batchUpdateSellStatus(Long[] ids, int sellStatus) {
        return goodsMapper.batchUpdateSellStatus(ids, sellStatus) > 0;
    }



    @Override
    public Boolean updateStockNum(List<StockNumDTO> stockNumDTOS) {
        return goodsMapper.updateStockNum(stockNumDTOS) > 0;
    }
}
